1. Field of the Invention
Exemplary embodiments of the present invention relate to a database management system (DBMS), and more particularly, to a high availability DBMS.
2. Discussion of the Background
A database management system (DBMS) refers to a system that manages a database (DB) storing a huge amount of data. The DBMS is regarded as an item of importance in the modern world where a great amount of information is being produced on a continuous basis, and the DBMS has been diversely utilized, in varied fields, to provide an online service.
A DBMS operator may make a mistake, or an error may occur in system hardware while the DBMS is being operated. In this instance, the error may cause a tremendous amount of damage. In particular, for a portal service that provides services for 24 hours, an error in the DBMS may be a fatal error.
Therefore, the most important point of focus for the operation of the DBMS is taking precaution against an error occurring in the DBMS, that is, to provide a continuous service that uses the DBMS although an error occurs in the DBMS, and to prevent loss of data while the DBMS is restored.
A scheme of backing up an operational DB in an additional storage device, periodically, has been proposed as a precaution being taken against errors in the DBMS. In this example, the operational DB may be restored based on the backed up DB and may restart providing service even though an error occurs in the DBMS. However, although the operational DB is restored based on the backed up DB, there may be loss of data. The DB is backed up based on predetermined time intervals and thus, data generated after the backup may be lost. Also, when the backup interval is shortened to decrease data loss, a load is added to a system.
In addition, a scheme of generating a standby DBMS through asynchronous replication of an original DB has been suggested. The asynchronous replication replicates contents of the original DB continuously such that a service may be provided based on the standby DBMS when an error occurs in the original DB. However, the replicated DB based on the asynchronous replication and the original DB may not exactly the same and thus, data loss may occur when an error occurs in the original DBMS.
For example, it is assumed that there is a process of storing, in the original DB, data of which a range of a primary key is from “1” to “100”, sequentially, and an error occurs at a point in time when primary keys “1” to “99” are stored. In this example, the service may be provided based on the replicated DB. However, for data having a primary key “100” which is included in the original DB and is absent in the replicated DB, new data having a primary key “100” may be added. The added data is different from the data having the primary key “100” in the original DB and thus, different data having the identical primary key may exist in the original DB and the replicated DB, respectively. Accordingly, data loss occurs.
In addition to the above described weaknesses, the DB backup and replication method provided in the foregoing may have a drawback in that manually determining whether to use an operational DB restored based on backup data or a replicated DB, when an error occurs in the DBMS and thus, a service may be substantially stopped.
Also, in the DB backup and replication method, an application program that accesses the DBMS may need to change an access mechanism for a DB.